#include <iostream>
#include <string>
using namespace std;

const int N = 11;

int n;
int f[1 << N]; // 前缀和数组

//1.给一个[left, right]的序列，判断类型
//  利用前缀和计算这段区间的和sum
//	sum=right-left+1就是I串，sum=0就是B串，否则sum就是F串
//2.一分为二，分别处理左序列以及右序列
//3.输出类型

void dfs(int left, int right)
{
	if(left > right) return;

	//判断类型
	char ret;
	int sum = f[right] - f[left - 1];
	if(sum == right - left + 1) ret = 'I';
	else if(sum == 0) ret = 'B';
	else ret = 'F';

	if(left == right)
	{
		cout << ret;
		return;
	}

	int mid = (left + right) / 2;
	dfs(left, mid);
	dfs(mid + 1, right);

	cout << ret;
}

int main()
{
	cin >> n;
	n = (1 << n);
	for(int i = 1; i <= n; i++)
	{
		char ch; cin >> ch;
		int t = 0;
		if(ch == '1') t = 1;

		f[i] = f[i - 1] + t;
	}

	dfs(1, n);

	return 0;
}